package com.ark.cloud.javacallnative.modules.storage.service.impl;

import com.ark.cloud.javacallnative.entity.SensorObj;
import com.ark.cloud.javacallnative.modules.storage.mapper.SensorObjMapper;
import com.ark.cloud.javacallnative.modules.storage.service.SensorObjService;
import com.ark.cloud.javacallnative.util.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author fukun
 * @create 2021/8/30  下午5:36
 * @description
 */
@Service
public class SensorObjServiceImpl implements SensorObjService {
    @Autowired
    SensorObjMapper sensorObjDao;

    @Override
    public Long saveSensorObjInfo(SensorObj sensorObj) {
        sensorObj.setSensorObjId(UUIDUtil.next());
        sensorObjDao.insert(sensorObj);
        return sensorObj.getSensorObjId();
    }
}
